﻿<?php include("inc/global.inc");
      include("inc/page.php");
	  $hover=7;
$url="hotgroup.php";
$thepage=$_GET['page']?$_GET['page']:1;
$maxpage=20;
$g_rs=mysql_query("select p_cname from hot_list where id=".$_GET['pid']);
$g_row=mysql_fetch_array($g_rs);

?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><?=$g_row[p_cname]?>，<?=$g_row[p_cname]?>热点产品展示，<?=$m_row['m_cname']?><?php if($m_row['catalog_id2']){echo "专业$m_row[catalog_2]产品供应商。";}?></title>
<meta name="description" content="<?=$m_row['m_cname']?>为您提供<?=$g_row[p_cname]?>,<?=$g_row[p_cname]?>热点产品"/>
<meta name="keywords" content="<?=$g_row[p_cname]?>,<?=$g_row[p_cname]?>图片,<?=$g_row[p_cname]?>商家,<?=$m_row['m_cname']?>" />
<link href="/<?=$template?>/css/allcss.css" rel="stylesheet" type="text/css" />
<link href="/css/template.css" rel="stylesheet" type="text/css" />
<link href="/css/top1.css" rel="stylesheet" type="text/css" />
</head>
<body>
<?php include("inc/top1.php")?>
<div class="main">
<?php include("inc/top2.php")?>
<div class="ban1">
<div class="flash">
  <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="486" height="194">
    <param name="movie" value="/flash/18.swf" />
    <param name="quality" value="high" />
	<param name="wmode" value="transparent" />
    <embed src="/flash/18.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="486" height="194" wmode="transparent"  value="transparent"></embed>
  </object>
</div>
</div>
<div class="path size11"><a href="/">首页</a> >> <a href="/hot-list/1.htm">热点产品展示</a> >> <?=$g_row[p_cname]?></div>
<div class="left">
<?php include("inc/left2.php")?>
</div>
<div class="ad"></div>
<div class="right">
<div class="path1 size11">
  <form action="" method="post" name="PageItems">
    Show
    <select name="max" onchange="SelectPerPageItem(this)">
      <option value="10">10</option>
      <option value="20" selected="selected">20</option>
      <option value="30">30</option>
    </select>
    items per page
  </form>
</div>
<div class="rightbox">
  <div class="probox">
	<ul>
  <?php
  $p_rs=mysql_query("select id,picture,p_title,p_info from hot_pro where member_id=".$member_id." and p_list_id=".$_GET['pid']." and p_sh=1 order by id desc limit ".($thepage-1)*$maxpage.",$maxpage");
  while($p_row=mysql_fetch_array($p_rs)){
  ?>
	<li class="prolist">
	<a href="/hot/<?=$p_row['id']?>.htm"><?php if(trim($p_row['picture'])){?><img src="http://img.sandib2b.cn/<?=$p_row['picture']?>" width="100" height="100" /><?php }else{?><img src="/images/InfoPic.gif" width="100" height="100" /><?php }?></a>
	
  <dt><a href="/hot/<?=$p_row['id']?>.htm"><?=mb_substr($p_row['p_title'],0,25,'utf-8')?></a></dt>
  </li>
<?php
}
$rs2=mysql_query("select count(id) from hot_pro where member_id=".$member_id." and p_list_id='$_GET[pid]' and p_sh=1");
$totalrecord=mysql_result($rs2,0);
$totalpage=ceil($totalrecord/$maxpage);
mysql_free_result($rs2);
?> 
</ul>
</div>
  <!--page-->
<div class="page">
<div class="pageleft">
<ul>
<?php pages($thepage,$totalpage,$maxpage,5);?>
</ul>
</div>
<div class="pageright">
<form name="pageform" method="post" action="" onSubmit="return onCheckPage()"> 
共<?=$totalpage?>页，到第<input type="text" name="page" class="input-txt">
      <input type="submit" value="确定" class="but">
	  </form>
	  <script language="javascript"> 
function onCheckPage(){ 
var page = parseInt(document.pageform.page.value); 
if(isNaN(page)){ 
alert("请输入数字(1,<?=$totalpage?>)"); 
return false; 
} 
if(page <= 0 ) { 
page =1; 
} 
if(page ><?=$totalpage?>){ 
page=<?=$totalpage?>; 
} 
if(page>1 ) { 
document.pageform.action = "/hot-group/<?=$_GET[pid]?>/"+page+".htm"; 
} else { 
document.pageform.action = "/hot-group/<?=$_GET[pid]?>/1.htm"; 
}
return true; 
}
--> 
</script>
  </div>
<div class="onl"></div>
</div>
</div>
</div>
<div class="onl"></div>
</div>
<?php include("inc/foot.php");?>
</body>
</html>
<?php mysql_free_result($g_rs);?>
